import request from '@/assets/js/request.js';
//商品接口基础路径
const PRODUCT_BASE_PATH = '/wemall/product/api';
//商品分类基础路径
const CATEGORY_BASE_PATH = '/wemall/seller/category/api';
export default {
    /**商品*/
    product: {
        list: (params) => request({
            url: `${PRODUCT_BASE_PATH}/list`,
            method: 'GET',
            data: params
        })
    },
    /**商品分类*/
    category: {
        /**商品分类分页查询*/
        list: (params) => request({
            url: `${CATEGORY_BASE_PATH}/list`,
            method: 'GET',
            data: params
        }),
        /**创建商品分类*/
        create: (params) => request({
            url: `${CATEGORY_BASE_PATH}/create`,
            method: 'POST',
            data: params
        }),
        /**删除商品分类*/
        delete: (params) => request({
            url: `${CATEGORY_BASE_PATH}/delete/${params.id}`,
            method: 'DELETE',
            data: params
        }),
        /**更新商品分类*/
        modify: (params) => request({
            url: `${CATEGORY_BASE_PATH}/modify`,
            method: 'POST',
            data: params
        }),
        /**查询商品分类详情*/
        get: (params) => request({
            url: `${CATEGORY_BASE_PATH}/get/${params.id}`,
            method: 'GET',
            data: params
        }),
    }
}
